import { type } from "os";

export interface searchHospitalParamsType {
  hoscode?: string;
  hosname?: string;
  hostype?: string;
  provinceCode?: string;
  cityCode?: string;
  districtCode?: string;
  state?: 0 | 1;
}

export interface bookingRuleType {
  cycle: number;
  releaseTime: string;
  stopTime: string;
  quitDay: number;
  quitTime: string;
  rule: [string, string];
}

export interface hospitalListItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: string;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: 0 | 1;
  bookingRule: bookingRuleType | null;
}

export type hospitalListContentType = hospitalListItemType[];

export interface hospitalListReqReturnType {
  content: hospitalListContentType;
  pageable: {
    sort: {
      sorted: boolean;
      unsorted: boolean;
      empty: boolean;
    };
    pageNumber: number;
    pageSize: number;
    offset: number;
    paged: boolean;
    unpaged: boolean;
  };
  totalElements: number;
  totalPages: number;
  last: boolean;
  first: boolean;
  sort: {
    sorted: boolean;
    unsorted: boolean;
    empty: boolean;
  };
  numberOfElements: number;
  size: number;
  number: number;
  empty: boolean;
}

export interface getProvinceListItemType {
  id: number;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: object;
  parentId: number;
  name: string;
  value: string;
  dictCode: string;
  hasChildren: Boolean;
}

export type getProvinceListReturnType = getProvinceListItemType[];

export type getHospitalDetailType = {
  bookingRule?: bookingRuleType;
  hospital?: hospitalListItemType;
};

export interface getHospitalDepartmentItemType {
  depcode: string;
  depname: string;
  children: getHospitalDepartmentListType;
}

export type getHospitalDepartmentListType = getHospitalDepartmentItemType[];

export interface bookingScheduleItemType {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}

export type bookingScheduleListType = bookingScheduleItemType[];

export interface getScheduleRuleReturnType {
  total: number;
  bookingScheduleList: bookingScheduleListType;
  baseMap: {
    hosname: string;
  };
}

export interface getScheduleRuleListParamsType {
  page: number;
  limit: number;
  hoscode: string;
  depcode: string;
}

export interface findScheduleItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: 1 | 0;
  hosScheduleId: number;
}

export type findScheduleListType = findScheduleItemType[];
